package com.xs.ahoi.hcxs.utils;

import android.annotation.SuppressLint;
import android.content.Context;
import android.widget.Toast;

/**
 * author: ahoi
 * date: 2018/6/20 13:44
 * description:
 */
public class ToastUtil {
    private static Toast mToast;

    @SuppressLint("ShowToast")
    public static void createInstance(Context context) {
        if (mToast == null) {
            mToast = Toast.makeText(context, null, Toast.LENGTH_SHORT);
        }
    }

    public static void show(String msg) {
        mToast.setText(msg);
        mToast.show();
    }

    public static void show(int resId) {
        mToast.setText(resId);
        mToast.show();
    }

}
